package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.MarketFeedback;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("wx/feedback")
public class FeedbackController {
    @Autowired
    FeedbackService feedbackService;

    @RequestMapping("submit")
    public BaseRespVo feedbackSubmit(@RequestBody MarketFeedback marketFeedback){
        feedbackService.insertFeedback(marketFeedback);

        BaseRespVo<Object> baseRespVo = new BaseRespVo<>();
        baseRespVo.setErrmsg("成功");
        baseRespVo.setErrno(0);
        return baseRespVo;
    }
}
